package com.example.management.common.controller
import com.example.management.common.utils.ShiroUtils
import com.example.management.system.domain.UserDO
import org.springframework.stereotype.Controller

@Controller
open class BaseController {

    fun getUser(): UserDO {
        return ShiroUtils.getUser()
    }

    fun getUserId(): Long? {
        return getUser().userId
    }

    fun getUsername(): String {
        return getUser().username!!
    }
}